﻿import com.dinmax.flash.common.collection.*
import com.dinmax.flash.central.extension.state.*
import com.dinmax.flash.central.extension.log.*

class ExtensionLog extends Collection {
	/*
	public static var INIT_MISC:String = "<b>. </b>";
	public static var SEPARATOR:String = " | ";
	*/
	function ExtensionLog(){
		super();
	};

	public function addItem(key:String, value:State ):Void {
		var s:State = this.getItems()[this.getItems().length - 1];
		if(s.getName() != value.getName()){
			super.addItem(key, value);
		};
		return;
		
	}; //fin funci
	
	public function getItem(key:String):State {
		return State(super.getItem(key).getValue());
	}; //fin funci
	
	public function getItems():Array {
		var a:Array=super.getItems();
		var b:Array=new Array();
		for(var i:Number=0; i < a.length; i++){
			b.push(a[i].getValue());
		};
		return b;
	}; //fin funci
	
}; // fin de clase